package model;

import util.ObjectPush;

/**
 * @author rpitts@gmu.edu
 */
public class RemoteZone {
	
	private String name = "";
	private String IP = "";
	private int port = 0;
	
	public RemoteZone(String name, String iP, int port) {
		super();
		this.name = name;
		this.IP = iP;
		this.port = port;
		System.out.println ("Added Remote Zone " + getName() + " at " + getIP() + " on port " + getPort());
	}

	public String getName() {
		return name;
	}

	public String getIP() {
		return IP;
	}

	public int getPort() {
		return port;
	}
	
	public void sendMessage (Message msg) {
	
		// Push the message to RemoteZone
		ObjectPush.dataPush(msg, this.getIP(), this.getPort());

		System.out.println("Sending Message: " + msg.getMessage() + " to " + this.getName());

	}

}
